#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "Gamemap.h"
#include "Tank.h"

extern GameMap* gameMap;
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void DrawMap();

protected:
    virtual void paintEvent(QPaintEvent* event);
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void mousePressEvent(QMouseEvent *event);
    QTimer* timer;

private:
    Ui::Widget *ui;
    QPainter* mypainter;


};
#endif // WIDGET_H
